/*
 * @Author       : xiangmin
 * @File         : 下载文件
 * @Date         : 2023-08-08 19:49:38
 * @LastEditors  : xiangmin
 * @LastEditTime : 2023-08-08 20:48:10
 */

export default function (name: string, url: string): void {
	const a = document.createElement('a')
	a.download = name
	a.href = url
	document.body.appendChild(a)
	a.click()
	document.body.removeChild(a)
}
